<?php 
	header("Content-type:text/html;charset=utf-8");
	$id = $_GET["logId"];
	// 连接数据库
	$conn = mysql_connect("localhost","root","root");
	mysql_select_db("test");
	
	$result = mysql_query("select * from client_goods where client_name = $id",$conn);
	if(mysql_num_rows($result) > 0){
		$str = "";
		$s = 0;
		$fh = '"';
		$dh = "";
		while($obj = mysql_fetch_assoc($result)){
			// $str = $str . $obj["goods_id"] . ",";
			$str = $str . $dh . $fh. "a" . $s . $fh .":" . $fh . $obj["goods_id"] . $fh;
			$dh = ",";
			$str = $str . $dh . $fh. "b" . $s . $fh .":" . $fh . $obj["goods_color"] . $fh;
			$str = $str . $dh . $fh. "c" . $s . $fh .":" . $fh . $obj["goods_size"] . $fh;
			$str = $str . $dh . $fh. "d" . $s . $fh .":" . $fh . $obj["goods_text"] . $fh;
			$str = $str . $dh . $fh. "e" . $s . $fh .":" . $fh . $obj["goods_sum"] . $fh;
			$s++;
		}
		$str = "{" . $str . "}";
		echo $str;
	}else{
		echo 0;
	}
	mysql_close($conn);
?>